<script type="text/javascript" src="${base}/scripts/cggl/nbcgdcontent.js"></script>
<form id="nbcgdForm" method="post" class="easyui-tabs" fit="true">
<input name="cgd.id" type="hidden" value="${(cgd.id)!''}"/>
<input type="hidden" id="cgd_ewmtime" value="${(ewmtime)!}"/>

<div title="采购单" style="height: 100%;overflow-y: auto">
    <table id="table_nbcgdContent" style="width:98%;margin: 5px;display: none" class="tb tab-t t-bor">
        <col width="80px"/>
        <col width=""/>
        <col width="80px"/>
        <col width=""/>
        <col width="80px"/>
        <col width=""/>
        <input type="hidden" name="cgd.cglx" value="${(cgd.cglx)!}"/>
        <tr>
            <input id="cgd_cgdh_hidden" type="hidden" name="cgd.cgdh" value="${(cgd.cgdh)!}"/>
            <th >采购单号：</th>
            <td colspan="3">${(cgd.cgdh)!}</td>
            <th style="color:#f45212;">采购时间：</th>
            <td><input name="cgd.cgsj" class="easyui-datebox input-text" value="<#if cgd??>${(cgd.cgsj?date)!}<#else>${sysdate?date}</#if>"/></td>
        </tr>
        <tr>
            <th>采购类型：</th>
            <td id="cgd_cglx">
                <input type="hidden" name="cgd.cglx" value="nbcg"/>
                内部采购</td>
            <th>供&nbsp;应&nbsp;&nbsp;商：</th>
            <td colspan="3"><input id="cgd_gys_id" name="cgd.gys.id" type="text" required="true"  class="easyui-combotree input-text"  value="${(cgd.gys.id)!}"
                       data-options="url:'${base}/organ/gsjg/gsjg_tree?type=1',panelHeight:'200',editable:'true',lines:'true'"/></td>
        </tr>
        <tr>
            <th>申报公司：</th>
            <td>
                <input id="cgd_sbgs_jc" type="text" class="input-text" readonly="true"
                       value="<#if cgd??>${(cgd.sbgs.jc)!}<#else>${(yg.zggs.jc)!}</#if>"/>
                <input id="cgd_sbgs_id" name="cgd.sbgs.id"
                       value="<#if cgd??>${(cgd.sbgs.id)!}<#else>${(yg.zggs.id)!}</#if>" type="hidden"/>
            </td>
            <th>申报部门：</th>
            <td>
                <input id="cgd_sbbm_qc" type="text" class="input-text" readonly="true"
                       value="<#if cgd??>${(cgd.sbbm.qc)!}<#else>${(yg.zgjg.qc)!}</#if>"/>
                <input id="cgd_sbbm_id" name="cgd.sbbm.id"
                       value="<#if cgd??>${(cgd.sbbm.id)!}<#else>${(yg.zgjg.id)!}</#if>" type="hidden"/>
            </td>
            <th>申&nbsp;报&nbsp;&nbsp;人：</th>
            <td>
                <input type="hidden" id="cgd_sbr_id" name="cgd.sbr.id"
                       value="<#if cgd??>${(cgd.sbr.id)!}<#else>${(yg.id)!}</#if>"/>
                <input id="cgd_sbr_xm" type="text" class="input-text" readonly="readonly"
                       value="<#if cgd??>${(cgd.sbr.xm)!}<#else>${(yg.xm)!}</#if>"/>
            </td>
        </tr>
        <tr>
            <th>采购公司：</th>
            <td>
                <input id="cgd_cggs_jc" type="text" class="input-text" readonly="true"
                       value="<#if cgd??>${(cgd.cggs.jc)!}<#else>${(yg.zggs.jc)!}</#if>"/>
                <input id="cgd_cggs_id" name="cgd.cggs.id"
                       value="<#if cgd??>${(cgd.cggs.id)!}<#else>${(yg.zggs.id)!}</#if>" type="hidden"/>
                <#--<input id="cgd_cggs_id" name="cgd.cggs.id" type="text"  class="easyui-combotree input-text"  value="${(cgd.cggs.id)!}"-->
                       <#--data-options="url:'${base}/organ/gsjg/gsjg_tree?type=1',panelHeight:'200',editable:'true',lines:'true'"/>-->
            </td>
            <th>发货公司：</th>
            <td>
                <input id="cgd_fhgs_id" name="cgd.fhgs.id" type="text" value="${(cgd.fhgs.id)!}" class="input-text"/>
            </td>
            <th>发货日期：</th>
            <td><input  name="cgd.fhrq" class="easyui-datebox input-text"
                                     value="<#if cgd??>${(cgd.fhrq?date)!}<#else>${sysdate?date}</#if>"/></td>
        </tr>
        <tr>
            <th>到货日期：</th>
            <td><input  name="cgd.jhdhrq" class="easyui-datebox input-text"
                                       value="<#if cgd??>${(cgd.jhdhrq?date)!}<#else>${datetime?date}</#if>"/>
            </td>
            <th>承运单位：</th>
            <td><input id="cgd_ysdw_id" name="cgd.ysdw.id" type="text" value="${(cgd.ysdw.id)!}" class="input-text"/></td>
            <th>承&nbsp;运&nbsp;&nbsp;号：</th>
            <td><input id="cgd_cyh" name="cgd.cyh" type="text" value="${(cgd.cyh)!}"  class="input-text"/></td>
        </tr>
        <tr>
            <th>到货仓库：</th>
            <td><input id="cgd_dhck_id" name="cgd.dzck.id" type="text" value="${(cgd.dzck.id)!}"
                       class="input-text" required="true"/></td>
            <th>联系电话：</th>
            <td><input id="cgd_lxrdh_id" name="cgd.lxrdh" type="text"
                       value="${(cgd.lxrdh)!}" class="input-text"/></td>
            <th>税率(%)：</th>
            <td><input id="cgd_sl" name="cgd.sl" class="easyui-combobox input-text" type="text"
                       value="<#if cgd??>${(cgd.sl)!}<#else>17.0000</#if>"
                       data-options="precision:4,min:0,max:100"/>
            </td>
        </tr>
        <tr>
            <th>备注：</th>
            <td colspan="5"><textarea name="cgd.bz" cols="45" class="textarea"
                                      style="width: 100%">${(cgd.bz)!}</textarea></td>
        </tr>
    </table>
</div>
<div title="采购明细">
    <div id="nbcgd_cgdmx_toolbar">
        <div class="PTools">
            <ul class="niu">
            <#if htType!="bght" >
                <li><a id="cgd_content_mx_add" href="javascript:void(0);" plain="true">新增</a></li>
                <li><a id="cgd_content_mx_del" href="javascript:void(0);" class="del" plain="true">删除</a></li>
            </#if>
            </ul>
        </div>
    </div>
    <table id="cgd_mx">
    </table>
</div>
<div title="关联费用">
    <div id="nbcgd_cgdfy_toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><a id="cgd_content_glfy_add" href="javascript:void(0);" plain="true">新增</a></li>
                <li><a id="cgd_content_glfy_del" href="javascript:void(0);" class="del" plain="true">删除</a></li>
            </ul>
        </div>
    </div>
    <table id="cgd_fy">
    </table>
</div>
<div title="采购单打印">
    <div id="cgddy-toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><span class="xuan">选择打印机：</span>
                    <select class="ze" name="" style="">
                        <option>——默认——</option>
                    </select>
                </li>
                <li><a class="she" href="javascript:void(0);" onclick="cgd_checkIsInstall()">检查插件</a></li>
                <li><a class="watch" href="javascript:void(0);" onclick="cgd_printPreview()">打印预览</a></li>
                <li><a class="pen" href="javascript:void(0);" onclick="cgd_print()">打印</a></li>
            </ul>
        </div>
        <div id="cgddy_id">
            <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
                <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0
                       pluginspage="install_lodop32.exe"></embed>
            </object>

            <div id="cgddy_print_id" class="textcon">
                <table class="tb" style="width: 100%;font-size:13px;">
                    <colgroup>
                        <col width="12%;"/>
                        <col width="34%"/>
                        <col width="20%;"/>
                        <col width="34%"/>
                    </colgroup>
                    <caption align="center">
                    ${(cgd.cggs.jc)!}采购单(采购-收条)
                    </caption>
                    <tbody>
                    <tr>
                        <th>采购单编号:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"
                                   value="${(cgd.cgdh)!}"/></td>
                    </tr>
                    <tr>
                        <th>收货单位:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"
                                   value="${(cgd.cggs.jc)!}"/>
                        </td>
                        <th>供货单位:</th>
                        <td>
                            <input id="cgddy_gys_id" class="input-tian" readonly="readonly" value="${(cgd.gys.jc)!}"/>
                        </td>
                    </tr>
                    <tr>
                        <th>制单日期:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"
                                   value="<#if cgd??>${(cgd.dateCreated?date)!}<#else>${sysdate?date}</#if>"/>
                        </td>
                        <th>要求采购日期:</th>
                        <td>
                            <input id="cgddy_jhdhrq" class="input-tian" readonly="readonly"
                                   value="<#if cgd??>${(cgd.jhdhrq?date)!}<#else>${sysdate?date}</#if>"/>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div id="cgddy_cgd_id" class="textcon"></div>

            <div id="cgddy_print_end" class="textcon">
                <table class="tb" style="width: 100%;font-size:13px;">
                    <colgroup>
                        <col width="10%;"/>
                        <col width="15%"/>
                        <col width="10%;"/>
                        <col width="15%"/>
                        <col width="10%;"/>
                        <col width="15%"/>
                        <col width="13%;"/>
                        <col width="12%"/>
                    </colgroup>
                    <tbody>
                    <tr>
                        <th>制&nbsp;单&nbsp;人:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"
                                   value="${(zdr)!}"/></td>
                        <th>收&nbsp;货&nbsp;人:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"/>
                        </td>
                        <th>验&nbsp;收&nbsp;组:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"/>
                        </td>
                        <th>负责人签字:</th>
                        <td>
                            <input class="input-tian" readonly="readonly"/>
                        </td>
                    </tr>
                    <tr>
                        <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</th>
                        <td colspan="7">
                            <input class="input-tian" readonly="readonly"/>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td colspan="7"><span  style="margin-left: 400px;">${(CurrentTime?string('yyyy-MM-dd HH:mm:ss'))!}</span></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</form>